#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char const *argv[])
{
	FILE *f = fopen("data.log","r");
	FILE *fo = fopen("nam_result.txt", "w");
	char msg[1024];
	//char header[50];

	while(fgets(msg, 1024, f)!=NULL)
	{
		// if(strrchr(header,'A')!=NULL)
		// {
		// 	fputs(msg,fo);
		// }
		if(strstr(msg,"KR7005930003")!=NULL)
			fputs(msg,fo);
	}

	fclose(f);
	fclose(fo);
	return 0;
}